import request from '@/utils/request'
export const reqTradeMarkList =  (page,limit)=>request({
  url:`/admin/product/baseTrademark/${page}/${limit}`,
  method:'get'
})
//新增品牌 /admin/product/baseTrademark/save
//修改品牌的地址 put PUT /admin/product/baseTrademark/update
export const reqAddUpdateTradeMark = (tradeMark)=>{
  //携带id代表修改
  if(tradeMark.id){
    return request({
      url:'/admin/product/baseTrademark/update',
      method:'put',
      data:tradeMark
    })
  }else{
    //新增
    return request({
      url:'/admin/product/baseTrademark/save',
      method:'post',
      data:tradeMark
    })
  }
}
//删除品牌
export const deleteTradeMark=(id)=>{
  return request({
    url:`/admin/product/baseTrademark/remove/${id}`,
    method:'delete'
  })
}

